<%@ page contentType="text/html;charset=UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<!DOCTYPE html>
<html lang="zh-CN" >
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<meta name="format-detection" content="telephone=no" />
<title>修改个人资料</title>
<%--  <link rel="stylesheet" type="text/css" href="${ctxStatic}/member/themes/fashion/css/user.css" />  --%>


<link href="${ctxStatic }/site/themes/default/css/boilerplate.css" rel="stylesheet" type="text/css">
<link href="${ctxStatic }/site/themes/default/css/css.css" rel="stylesheet" type="text/css">


<%-- <script src="${ctxStatic}/jquery/jquery-migrate-1.1.1.min.js" type="text/javascript"></script> --%>
<script src="${ctxStatic }/site/themes/default/js/respond.min.js"></script>

<script src="${ctxStatic}/jquery/jquery-1.9.1.min.js" type="text/javascript"></script>
<%-- 
<script language="javascript" type="text/javascript" src="${ctxStatic}/My97DatePicker/WdatePicker.js"></script>
 --%>
<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js" type="text/javascript"></script>
<script src="${ctxStatic}/site/themes/default/js/hideOptionMenu.js" type="text/javascript"></script>

<script src="${ctxStatic}/site/themes/default/js/jquery-1.9.1.js" type="text/javascript"></script>
<script src="${ctxStatic}/site/themes/default/js/date.js" type="text/javascript"></script>
<script src="${ctxStatic}/site/themes/default/js/iscroll.js" type="text/javascript"></script>
<link href="${ctxStatic }/site/themes/default/css/common.css" rel="stylesheet" type="text/css">

<script type="text/javascript">

$(document).ready(function() {
	$("#errorMessage").hide()
	var sex = $("#msex").val();
	$(":radio[name='sex'][value='"+sex+"']").attr("checked","true"); 
	
});


$(function(){
	/* $("#birthday").date(); */
	
	$('#beginTime').date();
	/* $('#endTime').date({theme:"datetime"}); */
});


$(function(){
	$("#move").mouseover(function(){
		$("#moveshow").addClass("show");
		$("#moveUl").show();
	});
	
	$("#move").mouseout(function(){
		$("#moveshow").removeClass("show");
		setInterval("$('#moveUl').hide();",5000);
		
	});
});

function checkForm(){
	var nick = $.trim($('#nickName').val());
	var tel = $.trim($('#mobile').val());
	var email = $.trim($('#email').val());
	 var val=$('input:radio[name="sex"]:checked').val();
	if(nick == null || nick ==''){
		$("#errorMessage").html("请输入姓名");
		$("#errorMessage").show();
		return false;
	}else{
		if(/^[\u4e00-\u9fa5]+$/.test(nick)){
			var length = nick.replace(/[^\x00-\xff]/g,"**").length;
			if(length<4 || length>12){
				$("#errorMessage").html("请输入2-6个中文名称。");
				$("#errorMessage").show();
				return false;
			}else{
				if(val==null){
					$("#errorMessage").html("请输选择性别");
					$("#errorMessage").show();
					return false;
				}else{
					if(tel == null || tel ==''){
						$("#errorMessage").html("请输入手机号");
						$("#errorMessage").show()
						return false;
					}else{
						if(/^1[3,4,5,8]\d{9}$/g.test(tel)||(/^15[8,9]\d{8}$/g.test(tel))){
							if(email == null || email ==''){
								$("#errorMessage").hide();
								return true;
							}else{
								var re = /^(\w-*\.*)+@(\w-?)+(\.\w{2,})+$/;
								if(re.test(email)){
									$("#errorMessage").hide();
									return true;
								}else{
									$("#errorMessage").html("邮箱输入不正确。");
									$("#errorMessage").show()
									return false;
							    }
							}
						}else{
							$("#errorMessage").html("手机号输入不正确。");
							$("#errorMessage").show()
							return false;
						}
					}
				}
			}
		}else{
			$("#errorMessage").html("请输入中文名称。");
			$("#errorMessage").show();
			return false;
		}
		
	}
}


</script>

<style type="text/css">
.backg{ padding-bottom:10px;}
.bd{margin-left:35px; clear:both;margin-top:15px;}
.bd li{clear:both; line-height:60px;height:60px;height: 38px;}
.message-input{ width:65%;height: 24px;padding: 6px 12px;float:Left;font-size: 14px;line-height: 1.42857;color: #555;vertical-align: middle;background-color: #FFF;background-image: none;border: 1px solid #CCC;border-radius: 4px;box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.075) inset;transition: border-color 0.15s ease-in-out 0s, box-shadow 0.15s ease-in-out 0s;}
.message-tool{ text-align:center; padding-bottom: 35px;}
.message-btn{ margin:0; padding:0; height:35px; line-height:35px; width:120px; cursor:pointer; font-size:14px; font-family:'Î¢ÈíÑÅºÚ'; background:#cc3333;color:#fff;border-radius:2px;font-weight:bold;text-decoration:none;border:0px;margin-right:30px;margin-bottom:10px;}
.message-btn21{ margin:0; padding:0; height:35px; line-height:35px; width:120px; cursor:pointer; font-size:14px; font-family:'Î¢ÈíÑÅºÚ'; background:#cc3333;color:#fff;border-radius:2px;font-weight:bold;text-decoration:none;border:0px;margin-right:30px;margin-bottom:10px;}
.message-btn211{ margin:0; padding:0; height:35px; line-height:35px; width:80px; cursor:pointer; font-size:14px; font-family:'Î¢ÈíÑÅºÚ'; background:#cc3333;color:#fff;border-radius:2px;font-weight:bold;text-decoration:none;border:0px;margin-right:30px;margin-bottom:10px;float:right;}
.message-input2 {color: #555555;float: left;font-size: 14px; height: 24px; line-height: 1.42857; padding: 6px 12px; vertical-align: middle; width: 17%;}
.message-tit{width: 25%; height:26px; line-height:26px;float:left;margin-top:5px;}
</style>
</head>
<body style="height: 0%;">
<div class="gridContainer clearfix" id="shopcar">
  <div id="LayoutDiv1" style="min-height:480px;">
     <header style="text-align: left;">    
	    <ul class="menu">  
	    	<span style=" font-size:18px; color:#FFF" class="left biaoti icon_left" onclick="history.back(-1)" >修改个人资料</span>
			<li id="moveshow" > <a href="#" id="move"  ><span class="icon_menu right"></span></a>
				<ul id="moveUl" style="display:none;">
					<jsp:include page="./right.jsp"></jsp:include>
				</ul>
			</li>			
		</ul>
	</header>
    <section class="clearOne" style="clear: both;">
    	  <div class="backg" style="min-height: 460px;">

   			<div class="bd" style="margin-left:0px;">
   				
   				<input type="hidden" id="msex" value="${member.sex }">
   	
   				<form id="inputForm" action="${ctxFront }/site/shopping/updatePersonInformation?uid=${uid}&wechatId=${wechatId}"
						method="post" onsubmit=" return checkForm();">
						<input type="hidden" name="topage" value="${topage }" /> 
						<input type="hidden" name="wechatId" value="${wechatId }" /> 
						<input type="hidden" name="mid" value="${member.id  }" />
              <ul>
                <li>
                  <div class="message-tit" >姓<span style="color: #f9f9f9;">一一</span>名：</div>
                  <input name="name" id="nickName" class="message-input" type="text" maxlength="15" value="${member.name }" ></li>
                <li>
                 <div class="message-tit">性<span style="color: #f9f9f9;">一一</span>别：</div>
                 <label class="message-input2"><input type="radio" name ="sex" value="男" class="message-input2"  />男</label>
				 <label class="message-input2"><input type="radio" name ="sex" value="女" class="message-input2"/>女</label>
				<!-- <label class="message-input2"><input type="radio" name ="sex" value="保密"  class="message-input2" />保密</label> -->
				</li>
				<li>
                  <div class="message-tit">手<span style="color: #f9f9f9;">一一</span>机：</div>
                  <input name="mobile" id="mobile" type="text" onkeyup="(this.v=function(){this.value=this.value.replace(/[^0-9]/,'');}).call(this)" onblur="this.v();" maxlength="11" value="${member.mobile}" class="message-input"  />
                </li>
                <li>
                  <div class="message-tit">身份证号：</div>
                  <input name="IDCardNumber" type="text" class="message-input" type="text" maxlength="18" value="${member.IDCardNumber }"/>
                </li>
                <li>
                  <div class="message-tit">邮<span style="color: #f9f9f9;">一一</span>箱：</div>
                  <input id="email" name="email"  type="text" class="message-input" type="text" value="${member.email }"/>
                </li>
                <li>
                  <div class="message-tit">生<span style="color: #f9f9f9;">一一</span>日：</div>
                  <%-- <input name="birthday"  type="text" id="d243"  onfocus="WdatePicker({skin:'whyGreen',dateFmt:'yyyyMMdd'})" value="${member.birthday }" class="message-input"  /> --%>
                	<input  id="beginTime" name="birthday" type="text" value="${member.birthday }" class="message-input"/></div>
                </li>
               	<br/>
                  <span> <font color="red">${message}</font></span>
               	<br/>
				<div  align="center" class="alert" id="errorMessage" style="color:red;"  >
				${message}
				</div>
                <div class="message-tool">
                  <input class="message-btn" value="确 定" type="submit">
                </div>
              </ul>
              </form>
            </div>
		</div>
    </section>
  </div>
	<div  class="jszch">技术支持：<a href="http://www.hdzhx.com/boxin/index.html" >智讯互联</a></div> 
</div>


<div class="kePublic">
	<div id="datePlugin"></div> <!--效果html结束--> <div class="clear"></div>
</div>

</body>
</html>
